/*
 * Project: Sudoku Hint Engine for Android
 * Copyright (C) 2010-2013 Emanuel Moecklin
 * 
 * Available under the terms of the Lesser General Public License (LGPL)
 */
package com.onegravity.sudoku.solver.data;

import java.util.List;

import com.onegravity.sudoku.solver.data.CellPosition;
import com.onegravity.sudoku.solver.data.ExtraRegion;

/**
 * An extra region of a sudoku grid consisting of 9 cells.
 * @author Emanuel Moecklin
 */
public class ExtraRegionImpl implements ExtraRegion {

	private static final long serialVersionUID = 677085583982077953L;

	private List<CellPosition> positions;
	private int index;
	
	ExtraRegionImpl(List<CellPosition> positions, int index) {
		this.index = index;
    	this.positions = positions;
    }

	@Override
	public com.onegravity.sudoku.solver.data.CellPosition getPosition(int index) {
		return positions.get(index);
	}

	@Override
	public List<com.onegravity.sudoku.solver.data.CellPosition> getPositions() {
		return positions;
	}

	@Override
	public int getRegionIndex() {
		return index;
	}

}